import {getToday, getMonthEn, getSeasons, getTwelveAnimals} from './dateUtil'
const STATIC_URL = {
    'DEV': 'http://192.168.100.142:9000/public/webstatus', // 开发
    'PRO': 'http://192.168.100.142:9000/public/webstatus', // 生产
}

const ANIMALS_ARR = ['rat.png', 'cattle.png', 'tiger.png', 'rabbit.png', 'dragon.png', 'snake.png', 'horse.png', 'sheep.png', 'monkey.png', 'chicken.png', 'dog.png', 'pig.png']

let SERVER_URL = STATIC_URL['DEV']

/**
 * 获取日的icon
 * @returns {string}
 */
function getTodayIcon() {
    return SERVER_URL + `/day/day${getToday()}.png`
}

function getThisWeekIcon() {
    return SERVER_URL + `/week/thisweek.png`
}

/**
 * 获取月的icon
 * @returns {string}
 */
function getMonthIcon() {
    return SERVER_URL + `/month/${getMonthEn()}.png`
}

/**
 * 获取季的icon
 * @returns {string}
 */
function getSeasonsIcon() {
    return SERVER_URL + `/seasons/${getSeasons()}.png`
}

/**
 * 获取十二生肖的icon
 * @returns {string}
 */
function getTwelveAnimalsIcon() {
    return SERVER_URL + `/animal/${ANIMALS_ARR[getTwelveAnimals()]}`
}

export  {
    getTodayIcon,
    getThisWeekIcon,
    getMonthIcon,
    getSeasonsIcon,
    getTwelveAnimalsIcon
}